package com.livegoods.controller;

import com.livegoods.commons.pojo.LivegoodsResult;
import com.livegoods.pojo.LoginLog;
import com.livegoods.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class LoginController {

    @Autowired
    private LoginService loginService;

    @PostMapping("/sendyzm")
    public LivegoodsResult sendVerifyCode(String phone){
        return loginService.sendVerifyCode(phone);
    }

    @PostMapping("/login")
    public LivegoodsResult login(LoginLog loginLog){
        return loginService.login(loginLog);
    }
}
